//
//  RequirementsTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/13.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "RequirementsTableViewCell.h"

@implementation RequirementsTableViewCell{
    GLGWLabel * requirmentLabel;
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        GLGWView * bankgroundView = [[GLGWView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(10), KScreenWidth-kWidthProportion_In_iPhoneTriploid(30), kHeightProportion_In_iPhoneTriploid(60)) inSuperView:self];
        bankgroundView.backgroundColor = [UIColor whiteColor];
        [bankgroundView setViewShadowWidth:3.0 theCornerRadius:3.0];
        //
        requirmentLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(20), bankgroundView.width - kWidthProportion_In_iPhoneTriploid(30), kHeightProportion_In_iPhoneTriploid(20)) theFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:bankgroundView];
        requirmentLabel.attributedText = [GLGWLabel bllChangeStr:@"要求  一票结算、平台担保、物流要求卖家承担" changewithStr:@"要求" changeColoer:[UIColor colorWithHexString:@"#999999"] withFont:SYSTEMFONT(14)];
    }
    return self;
}

-(void)setP_model:(PurchareModel *)p_model{
    _p_model = p_model;
    NSString * onePiaoStr = @"";
    NSString * pingTaiStr = @"";
    NSString * wuLiuStr = @"";
    //
    if (_p_model.isSettlementTogether == 1) {
        onePiaoStr = @"一票结算、";
    }
    if (_p_model.payType == 1) {
        pingTaiStr = @"公对公支付";
    }else{
        pingTaiStr = @"担保支付";
    }
    if (_p_model.logisticsRequire == 1) {
        wuLiuStr = @"买家自提";
    }else{
        wuLiuStr = @"卖家承担";
    }
    requirmentLabel.attributedText = [GLGWLabel bllChangeStr:[NSString stringWithFormat:@"要求    %@%@、%@",onePiaoStr,pingTaiStr,wuLiuStr] changewithStr:@"要求" changeColoer:[UIColor colorWithHexString:@"#999999"] withFont:SYSTEMFONT(14)];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
